home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / tools / gcc / gcc270_src.lha / gcc-2.7.0-amiga / gcc.info-14 < prev    next >
Encoding:
GNU Info File  |  1995-06-16  |  48.7 KB  |  1,113 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.55 from the input
  2. file gcc.texi.
  3.  
  4.    This file documents the use and the internals of the GNU compiler.
  5.  
  6.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  7. Boston, MA 02111-1307 USA
  8.  
  9.    Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995 Free Software
  10. Foundation, Inc.
  11.  
  12.    Permission is granted to make and distribute verbatim copies of this
  13. manual provided the copyright notice and this permission notice are
  14. preserved on all copies.
  15.  
  16.    Permission is granted to copy and distribute modified versions of
  17. this manual under the conditions for verbatim copying, provided also
  18. that the sections entitled "GNU General Public License," "Funding for
  19. Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are
  20. included exactly as in the original, and provided that the entire
  21. resulting derived work is distributed under the terms of a permission
  22. notice identical to this one.
  23.  
  24.    Permission is granted to copy and distribute translations of this
  25. manual into another language, under the above conditions for modified
  26. versions, except that the sections entitled "GNU General Public
  27. License," "Funding for Free Software," and "Protect Your Freedom--Fight
  28. `Look And Feel'", and this permission notice, may be included in
  29. translations approved by the Free Software Foundation instead of in the
  30. original English.
  31.  
  32. 
  33. File: gcc.info,  Node: Constants,  Next: Regs and Memory,  Prev: Machine Modes,  Up: RTL
  34.  
  35. Constant Expression Types
  36. =========================
  37.  
  38.    The simplest RTL expressions are those that represent constant
  39. values.
  40.  
  41. `(const_int I)'
  42.      This type of expression represents the integer value I.  I is
  43.      customarily accessed with the macro `INTVAL' as in `INTVAL (EXP)',
  44.      which is equivalent to `XWINT (EXP, 0)'.
  45.  
  46.      There is only one expression object for the integer value zero; it
  47.      is the value of the variable `const0_rtx'.  Likewise, the only
  48.      expression for integer value one is found in `const1_rtx', the only
  49.      expression for integer value two is found in `const2_rtx', and the
  50.      only expression for integer value negative one is found in
  51.      `constm1_rtx'.  Any attempt to create an expression of code
  52.      `const_int' and value zero, one, two or negative one will return
  53.      `const0_rtx', `const1_rtx', `const2_rtx' or `constm1_rtx' as
  54.      appropriate.
  55.  
  56.      Similarly, there is only one object for the integer whose value is
  57.      `STORE_FLAG_VALUE'.  It is found in `const_true_rtx'.  If
  58.      `STORE_FLAG_VALUE' is one, `const_true_rtx' and `const1_rtx' will
  59.      point to the same object.  If `STORE_FLAG_VALUE' is -1,
  60.      `const_true_rtx' and `constm1_rtx' will point to the same object.
  61.  
  62. `(const_double:M ADDR I0 I1 ...)'
  63.      Represents either a floating-point constant of mode M or an
  64.      integer constant too large to fit into `HOST_BITS_PER_WIDE_INT'
  65.      bits but small enough to fit within twice that number of bits (GNU
  66.      CC does not provide a mechanism to represent even larger
  67.      constants).  In the latter case, M will be `VOIDmode'.
  68.  
  69.      ADDR is used to contain the `mem' expression that corresponds to
  70.      the location in memory that at which the constant can be found.  If
  71.      it has not been allocated a memory location, but is on the chain
  72.      of all `const_double' expressions in this compilation (maintained
  73.      using an undisplayed field), ADDR contains `const0_rtx'.  If it is
  74.      not on the chain, ADDR contains `cc0_rtx'.  ADDR is customarily
  75.      accessed with the macro `CONST_DOUBLE_MEM' and the chain field via
  76.      `CONST_DOUBLE_CHAIN'.
  77.  
  78.      If M is `VOIDmode', the bits of the value are stored in I0 and I1.
  79.      I0 is customarily accessed with the macro `CONST_DOUBLE_LOW' and
  80.      I1 with `CONST_DOUBLE_HIGH'.
  81.  
  82.      If the constant is floating point (regardless of its precision),
  83.      then the number of integers used to store the value depends on the
  84.      size of `REAL_VALUE_TYPE' (*note Cross-compilation::.).  The
  85.      integers represent a floating point number, but not precisely in
  86.      the target machine's or host machine's floating point format.  To
  87.      convert them to the precise bit pattern used by the target
  88.      machine, use the macro `REAL_VALUE_TO_TARGET_DOUBLE' and friends
  89.      (*note Data Output::.).
  90.  
  91.      The macro `CONST0_RTX (MODE)' refers to an expression with value 0
  92.      in mode MODE.  If mode MODE is of mode class `MODE_INT', it
  93.      returns `const0_rtx'.  Otherwise, it returns a `CONST_DOUBLE'
  94.      expression in mode MODE.  Similarly, the macro `CONST1_RTX (MODE)'
  95.      refers to an expression with value 1 in mode MODE and similarly
  96.      for `CONST2_RTX'.
  97.  
  98. `(const_string STR)'
  99.      Represents a constant string with value STR.  Currently this is
  100.      used only for insn attributes (*note Insn Attributes::.) since
  101.      constant strings in C are placed in memory.
  102.  
  103. `(symbol_ref:MODE SYMBOL)'
  104.      Represents the value of an assembler label for data.  SYMBOL is a
  105.      string that describes the name of the assembler label.  If it
  106.      starts with a `*', the label is the rest of SYMBOL not including
  107.      the `*'.  Otherwise, the label is SYMBOL, usually prefixed with
  108.      `_'.
  109.  
  110.      The `symbol_ref' contains a mode, which is usually `Pmode'.
  111.      Usually that is the only mode for which a symbol is directly valid.
  112.  
  113. `(label_ref LABEL)'
  114.      Represents the value of an assembler label for code.  It contains
  115.      one operand, an expression, which must be a `code_label' that
  116.      appears in the instruction sequence to identify the place where
  117.      the label should go.
  118.  
  119.      The reason for using a distinct expression type for code label
  120.      references is so that jump optimization can distinguish them.
  121.  
  122. `(const:M EXP)'
  123.      Represents a constant that is the result of an assembly-time
  124.      arithmetic computation.  The operand, EXP, is an expression that
  125.      contains only constants (`const_int', `symbol_ref' and `label_ref'
  126.      expressions) combined with `plus' and `minus'.  However, not all
  127.      combinations are valid, since the assembler cannot do arbitrary
  128.      arithmetic on relocatable symbols.
  129.  
  130.      M should be `Pmode'.
  131.  
  132. `(high:M EXP)'
  133.      Represents the high-order bits of EXP, usually a `symbol_ref'.
  134.      The number of bits is machine-dependent and is normally the number
  135.      of bits specified in an instruction that initializes the high
  136.      order bits of a register.  It is used with `lo_sum' to represent
  137.      the typical two-instruction sequence used in RISC machines to
  138.      reference a global memory location.
  139.  
  140.      M should be `Pmode'.
  141.  
  142. 
  143. File: gcc.info,  Node: Regs and Memory,  Next: Arithmetic,  Prev: Constants,  Up: RTL
  144.  
  145. Registers and Memory
  146. ====================
  147.  
  148.    Here are the RTL expression types for describing access to machine
  149. registers and to main memory.
  150.  
  151. `(reg:M N)'
  152.      For small values of the integer N (those that are less than
  153.      `FIRST_PSEUDO_REGISTER'), this stands for a reference to machine
  154.      register number N: a "hard register".  For larger values of N, it
  155.      stands for a temporary value or "pseudo register".  The compiler's
  156.      strategy is to generate code assuming an unlimited number of such
  157.      pseudo registers, and later convert them into hard registers or
  158.      into memory references.
  159.  
  160.      M is the machine mode of the reference.  It is necessary because
  161.      machines can generally refer to each register in more than one
  162.      mode.  For example, a register may contain a full word but there
  163.      may be instructions to refer to it as a half word or as a single
  164.      byte, as well as instructions to refer to it as a floating point
  165.      number of various precisions.
  166.  
  167.      Even for a register that the machine can access in only one mode,
  168.      the mode must always be specified.
  169.  
  170.      The symbol `FIRST_PSEUDO_REGISTER' is defined by the machine
  171.      description, since the number of hard registers on the machine is
  172.      an invariant characteristic of the machine.  Note, however, that
  173.      not all of the machine registers must be general registers.  All
  174.      the machine registers that can be used for storage of data are
  175.      given hard register numbers, even those that can be used only in
  176.      certain instructions or can hold only certain types of data.
  177.  
  178.      A hard register may be accessed in various modes throughout one
  179.      function, but each pseudo register is given a natural mode and is
  180.      accessed only in that mode.  When it is necessary to describe an
  181.      access to a pseudo register using a nonnatural mode, a `subreg'
  182.      expression is used.
  183.  
  184.      A `reg' expression with a machine mode that specifies more than
  185.      one word of data may actually stand for several consecutive
  186.      registers.  If in addition the register number specifies a
  187.      hardware register, then it actually represents several consecutive
  188.      hardware registers starting with the specified one.
  189.  
  190.      Each pseudo register number used in a function's RTL code is
  191.      represented by a unique `reg' expression.
  192.  
  193.      Some pseudo register numbers, those within the range of
  194.      `FIRST_VIRTUAL_REGISTER' to `LAST_VIRTUAL_REGISTER' only appear
  195.      during the RTL generation phase and are eliminated before the
  196.      optimization phases.  These represent locations in the stack frame
  197.      that cannot be determined until RTL generation for the function
  198.      has been completed.  The following virtual register numbers are
  199.      defined:
  200.  
  201.     `VIRTUAL_INCOMING_ARGS_REGNUM'
  202.           This points to the first word of the incoming arguments
  203.           passed on the stack.  Normally these arguments are placed
  204.           there by the caller, but the callee may have pushed some
  205.           arguments that were previously passed in registers.
  206.  
  207.           When RTL generation is complete, this virtual register is
  208.           replaced by the sum of the register given by
  209.           `ARG_POINTER_REGNUM' and the value of `FIRST_PARM_OFFSET'.
  210.  
  211.     `VIRTUAL_STACK_VARS_REGNUM'
  212.           If `FRAME_GROWS_DOWNWARD' is defined, this points to
  213.           immediately above the first variable on the stack.
  214.           Otherwise, it points to the first variable on the stack.
  215.  
  216.           `VIRTUAL_STACK_VARS_REGNUM' is replaced with the sum of the
  217.           register given by `FRAME_POINTER_REGNUM' and the value
  218.           `STARTING_FRAME_OFFSET'.
  219.  
  220.     `VIRTUAL_STACK_DYNAMIC_REGNUM'
  221.           This points to the location of dynamically allocated memory
  222.           on the stack immediately after the stack pointer has been
  223.           adjusted by the amount of memory desired.
  224.  
  225.           This virtual register is replaced by the sum of the register
  226.           given by `STACK_POINTER_REGNUM' and the value
  227.           `STACK_DYNAMIC_OFFSET'.
  228.  
  229.     `VIRTUAL_OUTGOING_ARGS_REGNUM'
  230.           This points to the location in the stack at which outgoing
  231.           arguments should be written when the stack is pre-pushed
  232.           (arguments pushed using push insns should always use
  233.           `STACK_POINTER_REGNUM').
  234.  
  235.           This virtual register is replaced by the sum of the register
  236.           given by `STACK_POINTER_REGNUM' and the value
  237.           `STACK_POINTER_OFFSET'.
  238.  
  239. `(subreg:M REG WORDNUM)'
  240.      `subreg' expressions are used to refer to a register in a machine
  241.      mode other than its natural one, or to refer to one register of a
  242.      multi-word `reg' that actually refers to several registers.
  243.  
  244.      Each pseudo-register has a natural mode.  If it is necessary to
  245.      operate on it in a different mode--for example, to perform a
  246.      fullword move instruction on a pseudo-register that contains a
  247.      single byte--the pseudo-register must be enclosed in a `subreg'.
  248.      In such a case, WORDNUM is zero.
  249.  
  250.      Usually M is at least as narrow as the mode of REG, in which case
  251.      it is restricting consideration to only the bits of REG that are
  252.      in M.
  253.  
  254.      Sometimes M is wider than the mode of REG.  These `subreg'
  255.      expressions are often called "paradoxical".  They are used in
  256.      cases where we want to refer to an object in a wider mode but do
  257.      not care what value the additional bits have.  The reload pass
  258.      ensures that paradoxical references are only made to hard
  259.      registers.
  260.  
  261.      The other use of `subreg' is to extract the individual registers of
  262.      a multi-register value.  Machine modes such as `DImode' and
  263.      `TImode' can indicate values longer than a word, values which
  264.      usually require two or more consecutive registers.  To access one
  265.      of the registers, use a `subreg' with mode `SImode' and a WORDNUM
  266.      that says which register.
  267.  
  268.      Storing in a non-paradoxical `subreg' has undefined results for
  269.      bits belonging to the same word as the `subreg'.  This laxity makes
  270.      it easier to generate efficient code for such instructions.  To
  271.      represent an instruction that preserves all the bits outside of
  272.      those in the `subreg', use `strict_low_part' around the `subreg'.
  273.  
  274.      The compilation parameter `WORDS_BIG_ENDIAN', if set to 1, says
  275.      that word number zero is the most significant part; otherwise, it
  276.      is the least significant part.
  277.  
  278.      Between the combiner pass and the reload pass, it is possible to
  279.      have a paradoxical `subreg' which contains a `mem' instead of a
  280.      `reg' as its first operand.  After the reload pass, it is also
  281.      possible to have a non-paradoxical `subreg' which contains a
  282.      `mem'; this usually occurs when the `mem' is a stack slot which
  283.      replaced a pseudo register.
  284.  
  285.      Note that it is not valid to access a `DFmode' value in `SFmode'
  286.      using a `subreg'.  On some machines the most significant part of a
  287.      `DFmode' value does not have the same format as a single-precision
  288.      floating value.
  289.  
  290.      It is also not valid to access a single word of a multi-word value
  291.      in a hard register when less registers can hold the value than
  292.      would be expected from its size.  For example, some 32-bit
  293.      machines have floating-point registers that can hold an entire
  294.      `DFmode' value.  If register 10 were such a register `(subreg:SI
  295.      (reg:DF 10) 1)' would be invalid because there is no way to
  296.      convert that reference to a single machine register.  The reload
  297.      pass prevents `subreg' expressions such as these from being formed.
  298.  
  299.      The first operand of a `subreg' expression is customarily accessed
  300.      with the `SUBREG_REG' macro and the second operand is customarily
  301.      accessed with the `SUBREG_WORD' macro.
  302.  
  303. `(scratch:M)'
  304.      This represents a scratch register that will be required for the
  305.      execution of a single instruction and not used subsequently.  It is
  306.      converted into a `reg' by either the local register allocator or
  307.      the reload pass.
  308.  
  309.      `scratch' is usually present inside a `clobber' operation (*note
  310.      Side Effects::.).
  311.  
  312. `(cc0)'
  313.      This refers to the machine's condition code register.  It has no
  314.      operands and may not have a machine mode.  There are two ways to
  315.      use it:
  316.  
  317.         * To stand for a complete set of condition code flags.  This is
  318.           best on most machines, where each comparison sets the entire
  319.           series of flags.
  320.  
  321.           With this technique, `(cc0)' may be validly used in only two
  322.           contexts: as the destination of an assignment (in test and
  323.           compare instructions) and in comparison operators comparing
  324.           against zero (`const_int' with value zero; that is to say,
  325.           `const0_rtx').
  326.  
  327.         * To stand for a single flag that is the result of a single
  328.           condition.  This is useful on machines that have only a
  329.           single flag bit, and in which comparison instructions must
  330.           specify the condition to test.
  331.  
  332.           With this technique, `(cc0)' may be validly used in only two
  333.           contexts: as the destination of an assignment (in test and
  334.           compare instructions) where the source is a comparison
  335.           operator, and as the first operand of `if_then_else' (in a
  336.           conditional branch).
  337.  
  338.      There is only one expression object of code `cc0'; it is the value
  339.      of the variable `cc0_rtx'.  Any attempt to create an expression of
  340.      code `cc0' will return `cc0_rtx'.
  341.  
  342.      Instructions can set the condition code implicitly.  On many
  343.      machines, nearly all instructions set the condition code based on
  344.      the value that they compute or store.  It is not necessary to
  345.      record these actions explicitly in the RTL because the machine
  346.      description includes a prescription for recognizing the
  347.      instructions that do so (by means of the macro
  348.      `NOTICE_UPDATE_CC').  *Note Condition Code::.  Only instructions
  349.      whose sole purpose is to set the condition code, and instructions
  350.      that use the condition code, need mention `(cc0)'.
  351.  
  352.      On some machines, the condition code register is given a register
  353.      number and a `reg' is used instead of `(cc0)'.  This is usually the
  354.      preferable approach if only a small subset of instructions modify
  355.      the condition code.  Other machines store condition codes in
  356.      general registers; in such cases a pseudo register should be used.
  357.  
  358.      Some machines, such as the Sparc and RS/6000, have two sets of
  359.      arithmetic instructions, one that sets and one that does not set
  360.      the condition code.  This is best handled by normally generating
  361.      the instruction that does not set the condition code, and making a
  362.      pattern that both performs the arithmetic and sets the condition
  363.      code register (which would not be `(cc0)' in this case).  For
  364.      examples, search for `addcc' and `andcc' in `sparc.md'.
  365.  
  366. `(pc)'
  367.      This represents the machine's program counter.  It has no operands
  368.      and may not have a machine mode.  `(pc)' may be validly used only
  369.      in certain specific contexts in jump instructions.
  370.  
  371.      There is only one expression object of code `pc'; it is the value
  372.      of the variable `pc_rtx'.  Any attempt to create an expression of
  373.      code `pc' will return `pc_rtx'.
  374.  
  375.      All instructions that do not jump alter the program counter
  376.      implicitly by incrementing it, but there is no need to mention
  377.      this in the RTL.
  378.  
  379. `(mem:M ADDR)'
  380.      This RTX represents a reference to main memory at an address
  381.      represented by the expression ADDR.  M specifies how large a unit
  382.      of memory is accessed.
  383.  
  384. 
  385. File: gcc.info,  Node: Arithmetic,  Next: Comparisons,  Prev: Regs and Memory,  Up: RTL
  386.  
  387. RTL Expressions for Arithmetic
  388. ==============================
  389.  
  390.    Unless otherwise specified, all the operands of arithmetic
  391. expressions must be valid for mode M.  An operand is valid for mode M
  392. if it has mode M, or if it is a `const_int' or `const_double' and M is
  393. a mode of class `MODE_INT'.
  394.  
  395.    For commutative binary operations, constants should be placed in the
  396. second operand.
  397.  
  398. `(plus:M X Y)'
  399.      Represents the sum of the values represented by X and Y carried
  400.      out in machine mode M.
  401.  
  402. `(lo_sum:M X Y)'
  403.      Like `plus', except that it represents that sum of X and the
  404.      low-order bits of Y.  The number of low order bits is
  405.      machine-dependent but is normally the number of bits in a `Pmode'
  406.      item minus the number of bits set by the `high' code (*note
  407.      Constants::.).
  408.  
  409.      M should be `Pmode'.
  410.  
  411. `(minus:M X Y)'
  412.      Like `plus' but represents subtraction.
  413.  
  414. `(compare:M X Y)'
  415.      Represents the result of subtracting Y from X for purposes of
  416.      comparison.  The result is computed without overflow, as if with
  417.      infinite precision.
  418.  
  419.      Of course, machines can't really subtract with infinite precision.
  420.      However, they can pretend to do so when only the sign of the
  421.      result will be used, which is the case when the result is stored
  422.      in the condition code.   And that is the only way this kind of
  423.      expression may validly be used: as a value to be stored in the
  424.      condition codes.
  425.  
  426.      The mode M is not related to the modes of X and Y, but instead is
  427.      the mode of the condition code value.  If `(cc0)' is used, it is
  428.      `VOIDmode'.  Otherwise it is some mode in class `MODE_CC', often
  429.      `CCmode'.  *Note Condition Code::.
  430.  
  431.      Normally, X and Y must have the same mode.  Otherwise, `compare'
  432.      is valid only if the mode of X is in class `MODE_INT' and Y is a
  433.      `const_int' or `const_double' with mode `VOIDmode'.  The mode of X
  434.      determines what mode the comparison is to be done in; thus it must
  435.      not be `VOIDmode'.
  436.  
  437.      If one of the operands is a constant, it should be placed in the
  438.      second operand and the comparison code adjusted as appropriate.
  439.  
  440.      A `compare' specifying two `VOIDmode' constants is not valid since
  441.      there is no way to know in what mode the comparison is to be
  442.      performed; the comparison must either be folded during the
  443.      compilation or the first operand must be loaded into a register
  444.      while its mode is still known.
  445.  
  446. `(neg:M X)'
  447.      Represents the negation (subtraction from zero) of the value
  448.      represented by X, carried out in mode M.
  449.  
  450. `(mult:M X Y)'
  451.      Represents the signed product of the values represented by X and Y
  452.      carried out in machine mode M.
  453.  
  454.      Some machines support a multiplication that generates a product
  455.      wider than the operands.  Write the pattern for this as
  456.  
  457.           (mult:M (sign_extend:M X) (sign_extend:M Y))
  458.  
  459.      where M is wider than the modes of X and Y, which need not be the
  460.      same.
  461.  
  462.      Write patterns for unsigned widening multiplication similarly using
  463.      `zero_extend'.
  464.  
  465. `(div:M X Y)'
  466.      Represents the quotient in signed division of X by Y, carried out
  467.      in machine mode M.  If M is a floating point mode, it represents
  468.      the exact quotient; otherwise, the integerized quotient.
  469.  
  470.      Some machines have division instructions in which the operands and
  471.      quotient widths are not all the same; you should represent such
  472.      instructions using `truncate' and `sign_extend' as in,
  473.  
  474.           (truncate:M1 (div:M2 X (sign_extend:M2 Y)))
  475.  
  476. `(udiv:M X Y)'
  477.      Like `div' but represents unsigned division.
  478.  
  479. `(mod:M X Y)'
  480. `(umod:M X Y)'
  481.      Like `div' and `udiv' but represent the remainder instead of the
  482.      quotient.
  483.  
  484. `(smin:M X Y)'
  485. `(smax:M X Y)'
  486.      Represents the smaller (for `smin') or larger (for `smax') of X
  487.      and Y, interpreted as signed integers in mode M.
  488.  
  489. `(umin:M X Y)'
  490. `(umax:M X Y)'
  491.      Like `smin' and `smax', but the values are interpreted as unsigned
  492.      integers.
  493.  
  494. `(not:M X)'
  495.      Represents the bitwise complement of the value represented by X,
  496.      carried out in mode M, which must be a fixed-point machine mode.
  497.  
  498. `(and:M X Y)'
  499.      Represents the bitwise logical-and of the values represented by X
  500.      and Y, carried out in machine mode M, which must be a fixed-point
  501.      machine mode.
  502.  
  503. `(ior:M X Y)'
  504.      Represents the bitwise inclusive-or of the values represented by X
  505.      and Y, carried out in machine mode M, which must be a fixed-point
  506.      mode.
  507.  
  508. `(xor:M X Y)'
  509.      Represents the bitwise exclusive-or of the values represented by X
  510.      and Y, carried out in machine mode M, which must be a fixed-point
  511.      mode.
  512.  
  513. `(ashift:M X C)'
  514.      Represents the result of arithmetically shifting X left by C
  515.      places.  X have mode M, a fixed-point machine mode.  C be a
  516.      fixed-point mode or be a constant with mode `VOIDmode'; which mode
  517.      is determined by the mode called for in the machine description
  518.      entry for the left-shift instruction.  For example, on the Vax,
  519.      the mode of C is `QImode' regardless of M.
  520.  
  521. `(lshiftrt:M X C)'
  522. `(ashiftrt:M X C)'
  523.      Like `ashift' but for right shift.  Unlike the case for left shift,
  524.      these two operations are distinct.
  525.  
  526. `(rotate:M X C)'
  527. `(rotatert:M X C)'
  528.      Similar but represent left and right rotate.  If C is a constant,
  529.      use `rotate'.
  530.  
  531. `(abs:M X)'
  532.      Represents the absolute value of X, computed in mode M.
  533.  
  534. `(sqrt:M X)'
  535.      Represents the square root of X, computed in mode M.  Most often M
  536.      will be a floating point mode.
  537.  
  538. `(ffs:M X)'
  539.      Represents one plus the index of the least significant 1-bit in X,
  540.      represented as an integer of mode M.  (The value is zero if X is
  541.      zero.)  The mode of X need not be M; depending on the target
  542.      machine, various mode combinations may be valid.
  543.  
  544. 
  545. File: gcc.info,  Node: Comparisons,  Next: Bit Fields,  Prev: Arithmetic,  Up: RTL
  546.  
  547. Comparison Operations
  548. =====================
  549.  
  550.    Comparison operators test a relation on two operands and are
  551. considered to represent a machine-dependent nonzero value described by,
  552. but not necessarily equal to, `STORE_FLAG_VALUE' (*note Misc::.) if the
  553. relation holds, or zero if it does not.  The mode of the comparison
  554. operation is independent of the mode of the data being compared.  If
  555. the comparison operation is being tested (e.g., the first operand of an
  556. `if_then_else'), the mode must be `VOIDmode'.  If the comparison
  557. operation is producing data to be stored in some variable, the mode
  558. must be in class `MODE_INT'.  All comparison operations producing data
  559. must use the same mode, which is machine-specific.
  560.  
  561.    There are two ways that comparison operations may be used.  The
  562. comparison operators may be used to compare the condition codes `(cc0)'
  563. against zero, as in `(eq (cc0) (const_int 0))'.  Such a construct
  564. actually refers to the result of the preceding instruction in which the
  565. condition codes were set.  The instructing setting the condition code
  566. must be adjacent to the instruction using the condition code; only
  567. `note' insns may separate them.
  568.  
  569.    Alternatively, a comparison operation may directly compare two data
  570. objects.  The mode of the comparison is determined by the operands; they
  571. must both be valid for a common machine mode.  A comparison with both
  572. operands constant would be invalid as the machine mode could not be
  573. deduced from it, but such a comparison should never exist in RTL due to
  574. constant folding.
  575.  
  576.    In the example above, if `(cc0)' were last set to `(compare X Y)',
  577. the comparison operation is identical to `(eq X Y)'.  Usually only one
  578. style of comparisons is supported on a particular machine, but the
  579. combine pass will try to merge the operations to produce the `eq' shown
  580. in case it exists in the context of the particular insn involved.
  581.  
  582.    Inequality comparisons come in two flavors, signed and unsigned.
  583. Thus, there are distinct expression codes `gt' and `gtu' for signed and
  584. unsigned greater-than.  These can produce different results for the same
  585. pair of integer values: for example, 1 is signed greater-than -1 but not
  586. unsigned greater-than, because -1 when regarded as unsigned is actually
  587. `0xffffffff' which is greater than 1.
  588.  
  589.    The signed comparisons are also used for floating point values.
  590. Floating point comparisons are distinguished by the machine modes of
  591. the operands.
  592.  
  593. `(eq:M X Y)'
  594.      1 if the values represented by X and Y are equal, otherwise 0.
  595.  
  596. `(ne:M X Y)'
  597.      1 if the values represented by X and Y are not equal, otherwise 0.
  598.  
  599. `(gt:M X Y)'
  600.      1 if the X is greater than Y.  If they are fixed-point, the
  601.      comparison is done in a signed sense.
  602.  
  603. `(gtu:M X Y)'
  604.      Like `gt' but does unsigned comparison, on fixed-point numbers
  605.      only.
  606.  
  607. `(lt:M X Y)'
  608. `(ltu:M X Y)'
  609.      Like `gt' and `gtu' but test for "less than".
  610.  
  611. `(ge:M X Y)'
  612. `(geu:M X Y)'
  613.      Like `gt' and `gtu' but test for "greater than or equal".
  614.  
  615. `(le:M X Y)'
  616. `(leu:M X Y)'
  617.      Like `gt' and `gtu' but test for "less than or equal".
  618.  
  619. `(if_then_else COND THEN ELSE)'
  620.      This is not a comparison operation but is listed here because it is
  621.      always used in conjunction with a comparison operation.  To be
  622.      precise, COND is a comparison expression.  This expression
  623.      represents a choice, according to COND, between the value
  624.      represented by THEN and the one represented by ELSE.
  625.  
  626.      On most machines, `if_then_else' expressions are valid only to
  627.      express conditional jumps.
  628.  
  629. `(cond [TEST1 VALUE1 TEST2 VALUE2 ...] DEFAULT)'
  630.      Similar to `if_then_else', but more general.  Each of TEST1,
  631.      TEST2, ... is performed in turn.  The result of this expression is
  632.      the VALUE corresponding to the first non-zero test, or DEFAULT if
  633.      none of the tests are non-zero expressions.
  634.  
  635.      This is currently not valid for instruction patterns and is
  636.      supported only for insn attributes.  *Note Insn Attributes::.
  637.  
  638. 
  639. File: gcc.info,  Node: Bit Fields,  Next: Conversions,  Prev: Comparisons,  Up: RTL
  640.  
  641. Bit Fields
  642. ==========
  643.  
  644.    Special expression codes exist to represent bitfield instructions.
  645. These types of expressions are lvalues in RTL; they may appear on the
  646. left side of an assignment, indicating insertion of a value into the
  647. specified bit field.
  648.  
  649. `(sign_extract:M LOC SIZE POS)'
  650.      This represents a reference to a sign-extended bit field contained
  651.      or starting in LOC (a memory or register reference).  The bit field
  652.      is SIZE bits wide and starts at bit POS.  The compilation option
  653.      `BITS_BIG_ENDIAN' says which end of the memory unit POS counts
  654.      from.
  655.  
  656.      If LOC is in memory, its mode must be a single-byte integer mode.
  657.      If LOC is in a register, the mode to use is specified by the
  658.      operand of the `insv' or `extv' pattern (*note Standard Names::.)
  659.      and is usually a full-word integer mode.
  660.  
  661.      The mode of POS is machine-specific and is also specified in the
  662.      `insv' or `extv' pattern.
  663.  
  664.      The mode M is the same as the mode that would be used for LOC if
  665.      it were a register.
  666.  
  667. `(zero_extract:M LOC SIZE POS)'
  668.      Like `sign_extract' but refers to an unsigned or zero-extended bit
  669.      field.  The same sequence of bits are extracted, but they are
  670.      filled to an entire word with zeros instead of by sign-extension.
  671.  
  672. 
  673. File: gcc.info,  Node: Conversions,  Next: RTL Declarations,  Prev: Bit Fields,  Up: RTL
  674.  
  675. Conversions
  676. ===========
  677.  
  678.    All conversions between machine modes must be represented by
  679. explicit conversion operations.  For example, an expression which is
  680. the sum of a byte and a full word cannot be written as `(plus:SI
  681. (reg:QI 34) (reg:SI 80))' because the `plus' operation requires two
  682. operands of the same machine mode.  Therefore, the byte-sized operand
  683. is enclosed in a conversion operation, as in
  684.  
  685.      (plus:SI (sign_extend:SI (reg:QI 34)) (reg:SI 80))
  686.  
  687.    The conversion operation is not a mere placeholder, because there
  688. may be more than one way of converting from a given starting mode to
  689. the desired final mode.  The conversion operation code says how to do
  690. it.
  691.  
  692.    For all conversion operations, X must not be `VOIDmode' because the
  693. mode in which to do the conversion would not be known.  The conversion
  694. must either be done at compile-time or X must be placed into a register.
  695.  
  696. `(sign_extend:M X)'
  697.      Represents the result of sign-extending the value X to machine
  698.      mode M.  M must be a fixed-point mode and X a fixed-point value of
  699.      a mode narrower than M.
  700.  
  701. `(zero_extend:M X)'
  702.      Represents the result of zero-extending the value X to machine
  703.      mode M.  M must be a fixed-point mode and X a fixed-point value of
  704.      a mode narrower than M.
  705.  
  706. `(float_extend:M X)'
  707.      Represents the result of extending the value X to machine mode M.
  708.      m must be a floating point mode and X a floating point value of a
  709.      mode narrower than M.
  710.  
  711. `(truncate:M X)'
  712.      Represents the result of truncating the value X to machine mode M.
  713.      M must be a fixed-point mode and X a fixed-point value of a mode
  714.      wider than M.
  715.  
  716. `(float_truncate:M X)'
  717.      Represents the result of truncating the value X to machine mode M.
  718.      M must be a floating point mode and X a floating point value of a
  719.      mode wider than M.
  720.  
  721. `(float:M X)'
  722.      Represents the result of converting fixed point value X, regarded
  723.      as signed, to floating point mode M.
  724.  
  725. `(unsigned_float:M X)'
  726.      Represents the result of converting fixed point value X, regarded
  727.      as unsigned, to floating point mode M.
  728.  
  729. `(fix:M X)'
  730.      When M is a fixed point mode, represents the result of converting
  731.      floating point value X to mode M, regarded as signed.  How
  732.      rounding is done is not specified, so this operation may be used
  733.      validly in compiling C code only for integer-valued operands.
  734.  
  735. `(unsigned_fix:M X)'
  736.      Represents the result of converting floating point value X to
  737.      fixed point mode M, regarded as unsigned.  How rounding is done is
  738.      not specified.
  739.  
  740. `(fix:M X)'
  741.      When M is a floating point mode, represents the result of
  742.      converting floating point value X (valid for mode M) to an
  743.      integer, still represented in floating point mode M, by rounding
  744.      towards zero.
  745.  
  746. 
  747. File: gcc.info,  Node: RTL Declarations,  Next: Side Effects,  Prev: Conversions,  Up: RTL
  748.  
  749. Declarations
  750. ============
  751.  
  752.    Declaration expression codes do not represent arithmetic operations
  753. but rather state assertions about their operands.
  754.  
  755. `(strict_low_part (subreg:M (reg:N R) 0))'
  756.      This expression code is used in only one context: as the
  757.      destination operand of a `set' expression.  In addition, the
  758.      operand of this expression must be a non-paradoxical `subreg'
  759.      expression.
  760.  
  761.      The presence of `strict_low_part' says that the part of the
  762.      register which is meaningful in mode N, but is not part of mode M,
  763.      is not to be altered.  Normally, an assignment to such a subreg is
  764.      allowed to have undefined effects on the rest of the register when
  765.      M is less than a word.
  766.  
  767. 
  768. File: gcc.info,  Node: Side Effects,  Next: Incdec,  Prev: RTL Declarations,  Up: RTL
  769.  
  770. Side Effect Expressions
  771. =======================
  772.  
  773.    The expression codes described so far represent values, not actions.
  774. But machine instructions never produce values; they are meaningful only
  775. for their side effects on the state of the machine.  Special expression
  776. codes are used to represent side effects.
  777.  
  778.    The body of an instruction is always one of these side effect codes;
  779. the codes described above, which represent values, appear only as the
  780. operands of these.
  781.  
  782. `(set LVAL X)'
  783.      Represents the action of storing the value of X into the place
  784.      represented by LVAL.  LVAL must be an expression representing a
  785.      place that can be stored in: `reg' (or `subreg' or
  786.      `strict_low_part'), `mem', `pc' or `cc0'.
  787.  
  788.      If LVAL is a `reg', `subreg' or `mem', it has a machine mode; then
  789.      X must be valid for that mode.
  790.  
  791.      If LVAL is a `reg' whose machine mode is less than the full width
  792.      of the register, then it means that the part of the register
  793.      specified by the machine mode is given the specified value and the
  794.      rest of the register receives an undefined value.  Likewise, if
  795.      LVAL is a `subreg' whose machine mode is narrower than the mode of
  796.      the register, the rest of the register can be changed in an
  797.      undefined way.
  798.  
  799.      If LVAL is a `strict_low_part' of a `subreg', then the part of the
  800.      register specified by the machine mode of the `subreg' is given
  801.      the value X and the rest of the register is not changed.
  802.  
  803.      If LVAL is `(cc0)', it has no machine mode, and X may be either a
  804.      `compare' expression or a value that may have any mode.  The
  805.      latter case represents a "test" instruction.  The expression `(set
  806.      (cc0) (reg:M N))' is equivalent to `(set (cc0) (compare (reg:M N)
  807.      (const_int 0)))'.  Use the former expression to save space during
  808.      the compilation.
  809.  
  810.      If LVAL is `(pc)', we have a jump instruction, and the
  811.      possibilities for X are very limited.  It may be a `label_ref'
  812.      expression (unconditional jump).  It may be an `if_then_else'
  813.      (conditional jump), in which case either the second or the third
  814.      operand must be `(pc)' (for the case which does not jump) and the
  815.      other of the two must be a `label_ref' (for the case which does
  816.      jump).  X may also be a `mem' or `(plus:SI (pc) Y)', where Y may
  817.      be a `reg' or a `mem'; these unusual patterns are used to
  818.      represent jumps through branch tables.
  819.  
  820.      If LVAL is neither `(cc0)' nor `(pc)', the mode of LVAL must not
  821.      be `VOIDmode' and the mode of X must be valid for the mode of LVAL.
  822.  
  823.      LVAL is customarily accessed with the `SET_DEST' macro and X with
  824.      the `SET_SRC' macro.
  825.  
  826. `(return)'
  827.      As the sole expression in a pattern, represents a return from the
  828.      current function, on machines where this can be done with one
  829.      instruction, such as Vaxes.  On machines where a multi-instruction
  830.      "epilogue" must be executed in order to return from the function,
  831.      returning is done by jumping to a label which precedes the
  832.      epilogue, and the `return' expression code is never used.
  833.  
  834.      Inside an `if_then_else' expression, represents the value to be
  835.      placed in `pc' to return to the caller.
  836.  
  837.      Note that an insn pattern of `(return)' is logically equivalent to
  838.      `(set (pc) (return))', but the latter form is never used.
  839.  
  840. `(call FUNCTION NARGS)'
  841.      Represents a function call.  FUNCTION is a `mem' expression whose
  842.      address is the address of the function to be called.  NARGS is an
  843.      expression which can be used for two purposes: on some machines it
  844.      represents the number of bytes of stack argument; on others, it
  845.      represents the number of argument registers.
  846.  
  847.      Each machine has a standard machine mode which FUNCTION must have.
  848.      The machine description defines macro `FUNCTION_MODE' to expand
  849.      into the requisite mode name.  The purpose of this mode is to
  850.      specify what kind of addressing is allowed, on machines where the
  851.      allowed kinds of addressing depend on the machine mode being
  852.      addressed.
  853.  
  854. `(clobber X)'
  855.      Represents the storing or possible storing of an unpredictable,
  856.      undescribed value into X, which must be a `reg', `scratch' or
  857.      `mem' expression.
  858.  
  859.      One place this is used is in string instructions that store
  860.      standard values into particular hard registers.  It may not be
  861.      worth the trouble to describe the values that are stored, but it
  862.      is essential to inform the compiler that the registers will be
  863.      altered, lest it attempt to keep data in them across the string
  864.      instruction.
  865.  
  866.      If X is `(mem:BLK (const_int 0))', it means that all memory
  867.      locations must be presumed clobbered.
  868.  
  869.      Note that the machine description classifies certain hard
  870.      registers as "call-clobbered".  All function call instructions are
  871.      assumed by default to clobber these registers, so there is no need
  872.      to use `clobber' expressions to indicate this fact.  Also, each
  873.      function call is assumed to have the potential to alter any memory
  874.      location, unless the function is declared `const'.
  875.  
  876.      If the last group of expressions in a `parallel' are each a
  877.      `clobber' expression whose arguments are `reg' or `match_scratch'
  878.      (*note RTL Template::.) expressions, the combiner phase can add
  879.      the appropriate `clobber' expressions to an insn it has
  880.      constructed when doing so will cause a pattern to be matched.
  881.  
  882.      This feature can be used, for example, on a machine that whose
  883.      multiply and add instructions don't use an MQ register but which
  884.      has an add-accumulate instruction that does clobber the MQ
  885.      register.  Similarly, a combined instruction might require a
  886.      temporary register while the constituent instructions might not.
  887.  
  888.      When a `clobber' expression for a register appears inside a
  889.      `parallel' with other side effects, the register allocator
  890.      guarantees that the register is unoccupied both before and after
  891.      that insn.  However, the reload phase may allocate a register used
  892.      for one of the inputs unless the `&' constraint is specified for
  893.      the selected alternative (*note Modifiers::.).  You can clobber
  894.      either a specific hard register, a pseudo register, or a `scratch'
  895.      expression; in the latter two cases, GNU CC will allocate a hard
  896.      register that is available there for use as a temporary.
  897.  
  898.      For instructions that require a temporary register, you should use
  899.      `scratch' instead of a pseudo-register because this will allow the
  900.      combiner phase to add the `clobber' when required.  You do this by
  901.      coding (`clobber' (`match_scratch' ...)).  If you do clobber a
  902.      pseudo register, use one which appears nowhere else--generate a
  903.      new one each time.  Otherwise, you may confuse CSE.
  904.  
  905.      There is one other known use for clobbering a pseudo register in a
  906.      `parallel': when one of the input operands of the insn is also
  907.      clobbered by the insn.  In this case, using the same pseudo
  908.      register in the clobber and elsewhere in the insn produces the
  909.      expected results.
  910.  
  911. `(use X)'
  912.      Represents the use of the value of X.  It indicates that the value
  913.      in X at this point in the program is needed, even though it may
  914.      not be apparent why this is so.  Therefore, the compiler will not
  915.      attempt to delete previous instructions whose only effect is to
  916.      store a value in X.  X must be a `reg' expression.
  917.  
  918.      During the delayed branch scheduling phase, X may be an insn.
  919.      This indicates that X previously was located at this place in the
  920.      code and its data dependencies need to be taken into account.
  921.      These `use' insns will be deleted before the delayed branch
  922.      scheduling phase exits.
  923.  
  924. `(parallel [X0 X1 ...])'
  925.      Represents several side effects performed in parallel.  The square
  926.      brackets stand for a vector; the operand of `parallel' is a vector
  927.      of expressions.  X0, X1 and so on are individual side effect
  928.      expressions--expressions of code `set', `call', `return',
  929.      `clobber' or `use'.
  930.  
  931.      "In parallel" means that first all the values used in the
  932.      individual side-effects are computed, and second all the actual
  933.      side-effects are performed.  For example,
  934.  
  935.           (parallel [(set (reg:SI 1) (mem:SI (reg:SI 1)))
  936.                      (set (mem:SI (reg:SI 1)) (reg:SI 1))])
  937.  
  938.      says unambiguously that the values of hard register 1 and the
  939.      memory location addressed by it are interchanged.  In both places
  940.      where `(reg:SI 1)' appears as a memory address it refers to the
  941.      value in register 1 *before* the execution of the insn.
  942.  
  943.      It follows that it is *incorrect* to use `parallel' and expect the
  944.      result of one `set' to be available for the next one.  For
  945.      example, people sometimes attempt to represent a jump-if-zero
  946.      instruction this way:
  947.  
  948.           (parallel [(set (cc0) (reg:SI 34))
  949.                      (set (pc) (if_then_else
  950.                                   (eq (cc0) (const_int 0))
  951.                                   (label_ref ...)
  952.                                   (pc)))])
  953.  
  954.      But this is incorrect, because it says that the jump condition
  955.      depends on the condition code value *before* this instruction, not
  956.      on the new value that is set by this instruction.
  957.  
  958.      Peephole optimization, which takes place together with final
  959.      assembly code output, can produce insns whose patterns consist of
  960.      a `parallel' whose elements are the operands needed to output the
  961.      resulting assembler code--often `reg', `mem' or constant
  962.      expressions.  This would not be well-formed RTL at any other stage
  963.      in compilation, but it is ok then because no further optimization
  964.      remains to be done.  However, the definition of the macro
  965.      `NOTICE_UPDATE_CC', if any, must deal with such insns if you
  966.      define any peephole optimizations.
  967.  
  968. `(sequence [INSNS ...])'
  969.      Represents a sequence of insns.  Each of the INSNS that appears in
  970.      the vector is suitable for appearing in the chain of insns, so it
  971.      must be an `insn', `jump_insn', `call_insn', `code_label',
  972.      `barrier' or `note'.
  973.  
  974.      A `sequence' RTX is never placed in an actual insn during RTL
  975.      generation.  It represents the sequence of insns that result from a
  976.      `define_expand' *before* those insns are passed to `emit_insn' to
  977.      insert them in the chain of insns.  When actually inserted, the
  978.      individual sub-insns are separated out and the `sequence' is
  979.      forgotten.
  980.  
  981.      After delay-slot scheduling is completed, an insn and all the
  982.      insns that reside in its delay slots are grouped together into a
  983.      `sequence'.  The insn requiring the delay slot is the first insn
  984.      in the vector; subsequent insns are to be placed in the delay slot.
  985.  
  986.      `INSN_ANNULLED_BRANCH_P' is set on an insn in a delay slot to
  987.      indicate that a branch insn should be used that will conditionally
  988.      annul the effect of the insns in the delay slots.  In such a case,
  989.      `INSN_FROM_TARGET_P' indicates that the insn is from the target of
  990.      the branch and should be executed only if the branch is taken;
  991.      otherwise the insn should be executed only if the branch is not
  992.      taken.  *Note Delay Slots::.
  993.  
  994.    These expression codes appear in place of a side effect, as the body
  995. of an insn, though strictly speaking they do not always describe side
  996. effects as such:
  997.  
  998. `(asm_input S)'
  999.      Represents literal assembler code as described by the string S.
  1000.  
  1001. `(unspec [OPERANDS ...] INDEX)'
  1002. `(unspec_volatile [OPERANDS ...] INDEX)'
  1003.      Represents a machine-specific operation on OPERANDS.  INDEX
  1004.      selects between multiple machine-specific operations.
  1005.      `unspec_volatile' is used for volatile operations and operations
  1006.      that may trap; `unspec' is used for other operations.
  1007.  
  1008.      These codes may appear inside a `pattern' of an insn, inside a
  1009.      `parallel', or inside an expression.
  1010.  
  1011. `(addr_vec:M [LR0 LR1 ...])'
  1012.      Represents a table of jump addresses.  The vector elements LR0,
  1013.      etc., are `label_ref' expressions.  The mode M specifies how much
  1014.      space is given to each address; normally M would be `Pmode'.
  1015.  
  1016. `(addr_diff_vec:M BASE [LR0 LR1 ...])'
  1017.      Represents a table of jump addresses expressed as offsets from
  1018.      BASE.  The vector elements LR0, etc., are `label_ref' expressions
  1019.      and so is BASE.  The mode M specifies how much space is given to
  1020.      each address-difference.
  1021.  
  1022. 
  1023. File: gcc.info,  Node: Incdec,  Next: Assembler,  Prev: Side Effects,  Up: RTL
  1024.  
  1025. Embedded Side-Effects on Addresses
  1026. ==================================
  1027.  
  1028.    Four special side-effect expression codes appear as memory addresses.
  1029.  
  1030. `(pre_dec:M X)'
  1031.      Represents the side effect of decrementing X by a standard amount
  1032.      and represents also the value that X has after being decremented.
  1033.      x must be a `reg' or `mem', but most machines allow only a `reg'.
  1034.      m must be the machine mode for pointers on the machine in use.
  1035.      The amount X is decremented by is the length in bytes of the
  1036.      machine mode of the containing memory reference of which this
  1037.      expression serves as the address.  Here is an example of its use:
  1038.  
  1039.           (mem:DF (pre_dec:SI (reg:SI 39)))
  1040.  
  1041.      This says to decrement pseudo register 39 by the length of a
  1042.      `DFmode' value and use the result to address a `DFmode' value.
  1043.  
  1044. `(pre_inc:M X)'
  1045.      Similar, but specifies incrementing X instead of decrementing it.
  1046.  
  1047. `(post_dec:M X)'
  1048.      Represents the same side effect as `pre_dec' but a different
  1049.      value.  The value represented here is the value X has before being
  1050.      decremented.
  1051.  
  1052. `(post_inc:M X)'
  1053.      Similar, but specifies incrementing X instead of decrementing it.
  1054.  
  1055.    These embedded side effect expressions must be used with care.
  1056. Instruction patterns may not use them.  Until the `flow' pass of the
  1057. compiler, they may occur only to represent pushes onto the stack.  The
  1058. `flow' pass finds cases where registers are incremented or decremented
  1059. in one instruction and used as an address shortly before or after;
  1060. these cases are then transformed to use pre- or post-increment or
  1061. -decrement.
  1062.  
  1063.    If a register used as the operand of these expressions is used in
  1064. another address in an insn, the original value of the register is used.
  1065. Uses of the register outside of an address are not permitted within the
  1066. same insn as a use in an embedded side effect expression because such
  1067. insns behave differently on different machines and hence must be treated
  1068. as ambiguous and disallowed.
  1069.  
  1070.    An instruction that can be represented with an embedded side effect
  1071. could also be represented using `parallel' containing an additional
  1072. `set' to describe how the address register is altered.  This is not
  1073. done because machines that allow these operations at all typically
  1074. allow them wherever a memory address is called for.  Describing them as
  1075. additional parallel stores would require doubling the number of entries
  1076. in the machine description.
  1077.  
  1078. 
  1079. File: gcc.info,  Node: Assembler,  Next: Insns,  Prev: Incdec,  Up: RTL
  1080.  
  1081. Assembler Instructions as Expressions
  1082. =====================================
  1083.  
  1084.    The RTX code `asm_operands' represents a value produced by a
  1085. user-specified assembler instruction.  It is used to represent an `asm'
  1086. statement with arguments.  An `asm' statement with a single output
  1087. operand, like this:
  1088.  
  1089.      asm ("foo %1,%2,%0" : "=a" (outputvar) : "g" (x + y), "di" (*z));
  1090.  
  1091. is represented using a single `asm_operands' RTX which represents the
  1092. value that is stored in `outputvar':
  1093.  
  1094.      (set RTX-FOR-OUTPUTVAR
  1095.           (asm_operands "foo %1,%2,%0" "a" 0
  1096.                         [RTX-FOR-ADDITION-RESULT RTX-FOR-*Z]
  1097.                         [(asm_input:M1 "g")
  1098.                          (asm_input:M2 "di")]))
  1099.  
  1100. Here the operands of the `asm_operands' RTX are the assembler template
  1101. string, the output-operand's constraint, the index-number of the output
  1102. operand among the output operands specified, a vector of input operand
  1103. RTX's, and a vector of input-operand modes and constraints.  The mode
  1104. M1 is the mode of the sum `x+y'; M2 is that of `*z'.
  1105.  
  1106.    When an `asm' statement has multiple output values, its insn has
  1107. several such `set' RTX's inside of a `parallel'.  Each `set' contains a
  1108. `asm_operands'; all of these share the same assembler template and
  1109. vectors, but each contains the constraint for the respective output
  1110. operand.  They are also distinguished by the output-operand index
  1111. number, which is 0, 1, ... for successive output operands.
  1112.  
  1113.